<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="njtc" uri="http://www.njtcedu.cn/app/core"%>

<div class="mainSide">
	<script type="text/javascript">
		$(document).ready(function() {
			$("#m_avatar2").mouseover(function() {
				$(".avatar2_tips").show();
			});
			$("#m_avatar2").mouseout(function() {
				$(".avatar2_tips").hide();
			});
		});
	</script>
	<div class="memberBox" style="*height:210px;">
		<div class="person_info">
			<div class="avatar2" id="m_avatar2">
				<a href="${pageContext.request.contextPath}/home" title="1"> 
					<img src="${pageContext.request.contextPath}/${currentUser.userImage}" id="current_image">
				</a>
				<p class="avatar2_tips">
				<span id="uploadImg">
					<input type="file" class="imgUpload" name="imageFile" id="user_image_upload"/><a id="avatar_upload" href="javaScript:void(0);">修改头像</a> </span>
					<a id="avatar_upload" href="javaScript:void(0);">修改头像</a>
				</p>
			</div>
<style>
#uploadImg{ font-size:12px; overflow:hidden; position:absolute}
#user_image_upload{ position:absolute; z-index:100; margin-left:-180px; font-size:60px;opacity:0;filter:alpha(opacity=0); margin-top:-5px;}
</style>
			<div class="avatar2_info">
				<p class="name">
					<a href="#"> <b>${currentUser.nickName}</b> </a>
				</p>

				<div class="integral"></div>
				

				<div class="edit_sign">
					<span> <a href="#"> 编辑个人签名 </a> </span>
				</div>

			</div>
		</div>

		<div class="user_atten">
			<div class="person_atten_l">
				<p>
					<span class="num"><a href="#"
						title="admin关注的">0</a> </span>
				</p>
				<p>
					<a href="#" title="admin关注的">关注</a>
				</p>
			</div>
			<div class="person_atten_l">
				<p>
					<span class="num"><a href="#"
						title="关注admin的">0</a> </span>
				</p>
				<p>
					<a href="#" title="关注admin的">粉丝</a>
				</p>
			</div>
			<div class="person_atten_l">
				<p>
					<span class="num"><a href="#" title="admin的微博">${currentUser.contentNums}</a>
					</span>
				</p>
				<p>
					<a href="#" title="admin的微博">微博</a>
				</p>
			</div>
			<div class="person_atten_r">
				<p>
					<span class="num"><a href="#"
						title="赞过admin的">0</a> </span>
				</p>
				<p>
					<a href="#" title="赞过admin的">被赞</a>
				</p>
			</div>
		</div>
	</div>


	<div class="side">
		<h3>可能感兴趣的人</h3>
		<div class="sideul">
			<p class="r_replace">
				<a href="javascript:viod(0);"
					onclick="right_show_ajax('1','refresh','refresh'); return false;">换一换</a>
			</p>
			<div id="1_refresh"></div>
		</div>
	</div>

	<div id="side_follow" style="position: static;">
		<div id="side_follow_top10" class="side">
			<h3>最新推荐TOP10</h3>
			<div id="1_recommend" class="sideul">
				<ul class="hot_reply_b">没有找到相关微博
				</ul>
			</div>
		</div>
	</div>
</div>

<script>
$('#m_avatar2').find('#user_image_upload').change(function(){
 	$.dialog.tips('图片上传中...',600,'loading.gif');
	var rootPtah = "${pageContext.request.contextPath}";
    var url = "${pageContext.request.contextPath}/user/image/";
	$.ajaxFileUpload ({
		url : url,
		fileElementId :'user_image_upload',
		dataType : 'json',
		success : function (data, status){
			if (data) {
				$('#current_image').attr("src", rootPtah + data.imageUrl);
			}
		},
		
		error: function (data, status, e){
			alert(e);
			}
	});
	$.dialog.tips('数据上传完毕',1,'success.gif',function(){});
});

</script>